﻿#pragma execution_character_set("utf-8")
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QFileDialog>

#include "ExcelEngine.h"
#include "WordEngine.h"


QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void slot_OpenExcel(void);

    void slot_ReadExcel(void);

    void slot_OpenWord(void);

private:

    // 解析表格内容
    QStringList getTable(QString workSheet_Name);

    // 根据table在表格中的左上角坐标和总行数总列数解析表格
    QString table2String(QString workSheet_Name,int start_Row,int start_Column,int rows,int columns);

private:
    Ui::MainWindow *ui;

    ExcelEngine *m_ExcelEngine;
    WordEngine *m_WordEngine;
};
#endif // MAINWINDOW_H
